﻿using RockBus.Messages.Interfaces;
using System.ServiceModel.Channels;

namespace RockBus.MessageLogging.Interfaces
{
    public interface IMessageLogger
    {
        /// <summary>
        /// Logs the content of the current message (request or response, depends on the MessageDirection).
        /// </summary>
        /// <param name="messageContext"></param>
        void LogMessage(IMessageContext messageContext);

        /// <summary>
        /// Logs the content of the IMessage
        /// </summary>
        /// <param name="message"></param>
        void LogMessage(string logTag, IMessage message);

        /// <summary>
        /// Logs the content of the Message. Does not consume the message (for instance by making a copy of it)
        /// </summary>
        /// <param name="message"></param>
        void LogMessage(string logTag, ref Message message);

        /// <summary>
        /// Logs the content of the MessageBuffer.
        /// </summary>
        /// <param name="messageBuffer"></param>
        void LogMessage(string logTag, MessageBuffer messageBuffer);
    }
}
